package array;

import java.util.HashSet;

public class L392 {
    public boolean isSubsequence(String s, String t) {
        int sLen = s.length();
        int tLen = t.length();
        int sl=0, tl=0;
        while(sl<sLen && tl<tLen) {
            if(s.charAt(sl)==t.charAt(tl)) {
                sl++;
            }
            tl++;
        }
        return sl==sLen;
    }

    public static void main(String[] args) {
        L392 l392 = new L392();
        System.out.println(l392.isSubsequence("acb", "ahbgdc"));
    }
}
